﻿<%@ Page Language="C#" MasterPageFile="~/PM.Master" AutoEventWireup="true" CodeBehind="ClientsOverview.aspx.cs" Inherits="PM.Site.ClientsOverview" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <asp:Label ID="lblMsg" runat="server" Text="" Visible="false"></asp:Label>
    
    </div>
     <div >
                <asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" />    
     </div>
     <br />
    <div style="float:left;">
    <asp:Panel ID="pnlOverviewClients" runat="server" Font-Size="Medium" GroupingText="Overview Clients" Width="1685px" >
    <div style="padding:5px;">
     <asp:DataList  ID="dlClients" DataKeyField="ClientId"   runat="server" Visible="true" RepeatDirection="Horizontal"
                CellPadding="0" CellSpacing="0"   Font-Size="Smaller" HeaderStyle-Width ="1660px"
                ItemStyle-BackColor="#F6F4F5"  ItemStyle-BorderColor="#6B6B6B" 
                ItemStyle-BorderWidth="1px"  HeaderStyle-BackColor="#444444"  
                HeaderStyle-Height="30px" RepeatColumns="1" RepeatLayout="Flow" 
                onitemcommand="dlClients_ItemCommand"  >
                 <AlternatingItemStyle BackColor="#F9F9F9" />
                <HeaderTemplate>
                    <div style="padding-bottom: 0px;height:30px;margin:0px;color:White;">
                        <div style="width: 130px; float: left; text-align: center; font-weight: bold;padding-left:2px;">
                            Client Id</div>
                        <div style="width: 50px; float: left; text-align: center; font-weight: bold;">
                            Title</div>
                        <div style="width: 60px; float: left; text-align: center; font-weight: bold;">
                            Initials</div>
                        <div style="width: 150px; float: left; text-align: center; font-weight: bold;">
                            Surname</div>                        
                         <div style="width: 60px; float: left; text-align: center; font-weight: bold;">
                            Gender</div>
                         <div style="width: 80px; float: left; text-align: center; font-weight: bold;">
                            Date of Birth</div>
                         <div style="width: 80px; float: left; text-align: center; font-weight: bold;">
                            Marital Status</div>
                         <div style="width: 60px; float: left; text-align: center; font-weight: bold;">
                            #of Children</div>                         
                         <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                            Home Address</div>
                         <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                            Mobile No.</div>
                         <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                            Home Tele.</div>
                         <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                            Fax</div>
                         <div style="width: 150px; float: left; text-align: center; font-weight: bold;">
                            Email</div>
                         <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                            Occupation</div>
                         <div style="width: 80px; float: left; text-align: center; font-weight: bold;">
                            Reg. Date</div>
                         <div style="width: 150px; float: left; text-align: center; font-weight: bold;">
                            Remarks</div>
                         <div style="width: 50px; float: left; text-align: center; font-weight: bold;">
                            Active</div>
                         <div style="width: 50px; float: left; text-align: center; font-weight: bold;">
                            Edit</div>
                    </div>
                </HeaderTemplate>
                <ItemTemplate>
                    <div style="float: left; margin-bottom: 0px;min-height:15px; font-size:smaller;width:1660px; ">
                        <div style="width: 130px; float: left; text-align: center;min-height:12px;padding-left:2px;">
                            <label>
                                <%# Eval("ClientId")%></label></div>
                        <div style="width: 50px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Title")%></label></div>
                        <div style="width: 60px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Initials")%></label></div>
                        <div style="width: 150px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Surname")%></label></div>
                        <div style="width: 60px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Gender")%></label></div>
                        <div style="width: 80px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# ((DateTime)Eval("DoB")).ToShortDateString() %></label></div>
                        <div style="width: 80px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("MaritalStatus")%></label></div>
                        <div style="width: 60px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("NoOfChildren")%></label></div>
                        <div style="width: 100px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("AddressRes")%></label></div>
                        <div style="width: 100px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("TeleMob")%></label></div>  
                        <div style="width: 100px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("TeleRes")%></label></div>
                        <div style="width: 100px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Fax")%></label></div>
                        <div style="width: 150px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Email")%></label></div>
                        <div style="width: 100px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Occupation")%></label></div> 
                        <div style="width: 80px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# ((DateTime)Eval("RegDate")).ToShortDateString() %></label></div>
                        <div style="width: 150px; float: left; text-align: center;min-height:12px;">
                            <label>
                                <%# Eval("Remarks")%></label></div>
                                                                                     
                        <div style="width: 50px; float: left; text-align: center; font-weight: bold;">
                            <asp:CheckBox ID="chkActive" Checked='<%#Eval("Active") %>' runat="server" /></div>                            
                        
                        <div style="width: 50px; text-align: center; vertical-align: top; float: left;">
                            <asp:ImageButton ID="imgEdit" CommandName="EditClient" CommandArgument='<%# Eval("ClientId")%>' ImageUrl="~/Images/Edit.gif" runat="server" 
                                AlternateText="Edit client" /> 
                        </div>
                    </div>
                </ItemTemplate>
                
            </asp:DataList>
            </div>
            <br />
            <div style="float:right;" >
                <asp:Button ID="btnUpdate" runat="server" Text="Update" onclick="btnUpdate_Click" />    
            </div>
     </asp:Panel>
    </div>    
    
    
</asp:Content>
